'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/login', controller.login.index);
  router.post('/login/login', controller.login.login);
  router.post('/login/update', controller.login.update);
  router.get('/login/logout', controller.login.logout);
  router.get('/', controller.home.index);
  router.get('/admin', controller.admin.index);
  router.get('/result', controller.result.index);
  router.get('/error', controller.error.index);

  router.post('/admin/upcontent1', controller.admin.upcontent1);
  router.get('/admin/delcontent1', controller.admin.delcontent1);

  router.post('/admin/upcontent2', controller.admin.upcontent2);
  router.get('/admin/delcontent2', controller.admin.delcontent2);

  router.post('/admin/upcontent3', controller.admin.upcontent3);
  router.get('/admin/delcontent3', controller.admin.delcontent3);

  router.post('/admin/upcontent4', controller.admin.upcontent4);
  router.get('/admin/delcontent4', controller.admin.delcontent4);

  router.post('/admin/upcontent5', controller.admin.upcontent5);
  router.get('/admin/delcontent5', controller.admin.delcontent5);

  router.post('/admin/image1', controller.admin.upimage1);
  router.get('/admin/delimage1', controller.admin.delimage1);

  router.post('/admin/image2', controller.admin.upimage2);
  router.get('/admin/delimage2', controller.admin.delimage2);

  router.post('/admin/image3', controller.admin.upimage3);
  router.get('/admin/delimage3', controller.admin.delimage3);

  router.post('/admin/image4', controller.admin.upimage4);
  router.get('/admin/delimage4', controller.admin.delimage4);

  router.post('/admin/image5', controller.admin.upimage5);
  router.get('/admin/delimage5', controller.admin.delimage5);

  router.post('/admin/image6', controller.admin.upimage6);
  router.get('/admin/delimage6', controller.admin.delimage6);

  router.post('/admin/image7', controller.admin.upimage7);
  router.get('/admin/delimage7', controller.admin.delimage7);

  router.post('/admin/image8', controller.admin.upimage8);
  router.get('/admin/delimage8', controller.admin.delimage8);

  router.post('/admin/logo', controller.admin.uplogo);

  router.post('/admin/footer1', controller.admin.upfooter1);
  router.post('/admin/footer2', controller.admin.upfooter2);
  router.post('/admin/footer3', controller.admin.upfooter3);

  router.post('/admin/model1', controller.admin.upmodel1);
  router.post('/admin/model2', controller.admin.upmodel2);
  router.post('/admin/model3', controller.admin.upmodel3);
  router.post('/admin/model4', controller.admin.upmodel4);
  router.post('/admin/model5', controller.admin.upmodel5);
};
